package com.gxa.saas.service.impl;

import com.gxa.saas.mapper.LogMapper;
import com.gxa.saas.pojo.Log;
import com.gxa.saas.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author: yx
 * @Date: 2022/6/9 10:06
 */
@Service("logService")
public class LogServiceImpl implements LogService {

    @Autowired
    LogMapper logMapper;

    @Override
    public Integer insert(Log log) {
        return logMapper.insert(log);
    }

    @Override
    public List<Log> selectAll() {
        return logMapper.selectAll();
    }

    @Override
    public Integer selectAllNumber() {
        return logMapper.selectAllNumber();
    }

    @Override
    public List<Log> selectByPage(Integer offset) {
        return logMapper.selectByPage((offset-1)*10, 10);
    }

    @Override
    public void delete(String dateline) {
        logMapper.delete(dateline);
    }

    @Override
    public List<Log> selectByNameAndTime(Map map) {
        return logMapper.selectByNameAndDateline(map);
    }
}
